package com.cskaoyan.bo.system;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class AdminCreateBo {
    private Integer id;

    // TODO：没实现必须包含中英文
    @NotNull
    @Pattern(regexp = "^(?![0-9]$)(?![a-zA-Z]$)[0-9A-Za-z]{6,10}$", message = "管理员名称需包含英文和数字，长度在6-10之间")
    private String username;

    @NotNull
    @Length(min = 6, message = "管理员密码长度不能小于6")
    private String password;

    private String avatar;

    @NotNull
    private Integer[] roleIds;
}
